﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FFIV.Lib.WebExtension;
using FFIV.Lib.Controlers.Admin;
using FFIV.Lib.Utilities;

public partial class Admin_EditUserInfo : FFWebPageBase
{
	private EditUserInfoController m_Controller;

	protected override void InitialFileds()
	{
		m_Controller = new EditUserInfoController(uc_EditUserInfo);
	}

	protected override void BindingEvents()
	{
		uc_EditUserInfo.FinishEdit += new EventHandler(uc_EditUserInfo_FinishEdit);
	}

	void uc_EditUserInfo_FinishEdit(object sender, EventArgs e)
	{
		if (uc_EditUserInfo.ConfirmPassword == uc_EditUserInfo.Password)
		{
			m_Controller.FinishEdit();
			Page.ClientScript.RegisterStartupScript(GetType(), "myscript", "javascript:alert('修改成功，您的信息已成功保存！')", true);
		}
	}

	public override void ShowMessage()
	{
		if (!IsPostBack)
		{
			m_Controller.LoadPage();
		}
	}

	public override FFIV.Lib.Utilities.Permissions RequiredPermission
	{
		get { return Permissions.Author; }
	}
}
